#/usr/bin/env python 

from ChessBoard import ChessBoard

class threeRepFunction:

	def __init__(self):
		self.chessBoard = ChessBoard()

	#Refactored
	def threeRepetitions(self):
		ts = self.chessBoard._three_rep_stack[:self.chessBoard._state_stack_pointer]
		if (len(ts) and (ts.count(ts[len(ts)-1]) == 3)):
			return True
		return False